package ar.com.logic.components.strategy;

import java.util.Comparator;

public class ComparadorEstrategias implements Comparator<IEstrategia> {

	public int compare(IEstrategia arg0, IEstrategia arg1) {
		if(!arg0.esUnicaEjecucion() && arg1.esUnicaEjecucion()){
			return 1;
		}else if( arg0.esUnicaEjecucion() && !arg1.esUnicaEjecucion()){
			return -1;
		}else{
			return arg1.getPriority().compareTo(arg0.getPriority());
		}
		
		
	}

}
